//package com.gluck.stock.oauth.common.dal.plugins.interceptor;
//
//import com.gluck.stock.base.enums.BizSerErrorEnum;
//import com.gluck.stock.base.exception.BizSerException;
//import org.apache.ibatis.executor.statement.StatementHandler;
//import org.apache.ibatis.plugin.*;
//import org.springframework.stereotype.Component;
//
//import java.sql.Connection;
//import java.util.Properties;
//
///**
// * @ClassName SqlExceptionInterceptor
// * @Desc TODO
// * @Author shiyongzhe
// * @Date 2022/5/22 - 5:15 下午
// **/
//@Component
//@Intercepts(value = {
//        @Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class, Integer.class})})
//public class SqlExceptionInterceptor implements Interceptor {
//
//    @Override
//    public Object intercept(Invocation invocation) throws Throwable {
//        try{
//            return invocation.proceed();
//        }catch (Exception e){
//            System.out.println(e);
//            throw new BizSerException(BizSerErrorEnum.SYSTEM_ERROR);
//        }
//    }
//
//    @Override
//    public Object plugin(Object o) {
//        return Plugin.wrap(o, this);
//    }
//
//    @Override
//    public void setProperties(Properties properties) {
//
//    }
//}
